package com.maybach.common.exception;

/**
 * Created by houenxun on 16/2/16.
 */
// 统一的异常
public class MaybachException extends RuntimeException {
    private ErrorCodeEnum code;

    public MaybachException() {

    }

    public MaybachException(Throwable t) {
        super(t);
    }

    public MaybachException(String message, Throwable t) {
        super(message, t);
    }


    public MaybachException(ErrorCodeEnum code, Throwable t) {
        super(code.getDesc(), t);
        this.code = code;
    }


    public MaybachException(ErrorCodeEnum code, String message, Throwable t) {
        super(message, t);
        this.code = code;
    }


    public MaybachException(String message) {
        super(message);
    }


    public MaybachException(ErrorCodeEnum code) {
        super(code.getDesc());
        this.code = code;
    }


    public MaybachException(ErrorCodeEnum code, String message) {
        super(message);
        this.code = code;
    }
}
